package org.pearl.springbootsecurity.demo.MP.data;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * DataScope注解配置的属性
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class DataScopeMapperProperty {

    /**
     * 是否开启 默认true
     */
    boolean enabled;

    /**
     * 数据权限类型。默认一般是查询自己部门及下属部门数据
     */
    DataScopeType type;


    DataScopeMapperProperty(DataScope dataScope) {
        this.enabled = dataScope.enabled();
        this.type = dataScope.type();
    }
}
